def account_create(initial_amount=0):
    def inner(number,diposit=True):
        nonlocal initial_amount
        if diposit:
            initial_amount -= number
            print(f"取款:{number} 余额:{initial_amount}")
        else:
            initial_amount += number
            print(f"存款:{number} 余额:{initial_amount}")
    return inner

f1 = account_create(initial_amount=100)

f1(20)
f1(30)
f1(100,diposit=False)

